package com.itany.mapper;

import com.itany.pojo.Permission;
import com.itany.pojo.PermissionExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface PermissionMapper {
    long countByExample(PermissionExample example);

    int deleteByExample(PermissionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    List<Permission> selectByExample(PermissionExample example);

    Permission selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);

    int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);

    List<Permission> findAllPermission(@Param("moduleName") String moduleName, @Param("permissionName") String permissionName);


    List<Permission> findModulesWithPermission();

    List<Permission> findAllModulesWithPermissionsByLoginUserId(@Param("userid")Integer id);
}